﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Styx;
using Styx.Helpers;
using Styx.Logic.BehaviorTree;
using Styx.Plugins.PluginClass;
using Styx.Logic;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;

namespace ProfileHelper
{
    internal static class QuestFinished
    {
        public static void Finished(object sender, LuaEventArgs args)
        {
            // Get questID
            int QuestID = Lua.GetReturnVal<int>("return GetQuestID()", 0);

            //<TurnIn QuestName="Elder Mana'loa" QuestId="12030" TurnInName="Elder Mana'loa" TurnInId="188419" TurnInType="Object" X="3131.187" Y="1569.624" Z="163.5229" />


            WoWUnit Target = StyxWoW.Me.CurrentTarget;
            Log.Write("<TurnIn QuestName=\"\" QuestId=\"{0}\" TurnInName=\"{1}\" TurnInId=\"{2}\" X=\"{3}\" Y=\"{4}\" Z=\"{5}\" />", QuestID, Target.Name, Target.Entry, Target.X, Target.Y, Target.Z );

        }

    }
}
